package com.wanghang.springcloud.mcp.mcp.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * MCP服务响应
 * 
 * @author ariczhang
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class McpResponse {
    
    /**
     * 是否成功
     */
    private boolean success;

    
    /**
     * 响应数据
     */
    private Object data;
    
    /**
     * 错误信息
     */
    private String error;
    
    /**
     * 响应时间戳
     */
    private long timestamp;
    
    public static McpResponse success(Object data) {
        return new McpResponse(true, data, null, System.currentTimeMillis());
    }
    
    public static McpResponse error(String error) {
        return new McpResponse(false, null, error, System.currentTimeMillis());
    }
}